package com.correo.database.beans;

import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.StringBufferInputStream;
import java.sql.Timestamp;

public class MensajeBean {

    private String content;

    private String attach;

    private Timestamp createDate;

    private String MensajeId;
    
    private String Subject;
    

    private String head;

    private String importance;

    public MensajeBean () {
    }

    public String getAttach () {
        return attach;
    }

    public void setAttach (String val) {
        this.attach = val;
    }

    public String getContent () {
        return content;
    }

    public void setContent (InputStream stream) {
    	try {
    		if(stream==null){
    			this.content = "";
	    	}else{
	    		byte[] contenido= new byte[512];
	    		
					stream.read(contenido);
				
	    		this.content = new String(contenido);
	    	}
    	} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    }
    public InputStream getContentStream() { 	
		
		return new ByteArrayInputStream(content.getBytes());
	}
    public void setContent (String stream) {
    	content = stream;
    }
    public Timestamp getCreateDate () {
        return createDate;
    }

    public void setCreateDate (Timestamp val) {
        this.createDate = val;
    }

    public String getHead () {
        return head;
    }

    public void setHead (String val) {
        this.head = val;
    }

    public String getImportance () {
        return importance;
    }

    public void setImportance (String val) {
        this.importance = val;
    }

	public void setMensajeId(String val) {
		MensajeId = val;
	}

	public String getMensajeId() {
		return MensajeId;
	}

	public void setSubject(String val) {
		Subject = val;
	}

	public String getSubject() {
		return Subject;
	}

	
}

